/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package job.manager.db.sb;

import java.util.Collection;
import javax.ejb.Remote;
import job.manager.db.ec.UserGroupsEB;
import job.manager.db.ec.UsersEB;
import job.manager.db.ex.UserNotFoundException;

/**
 *
 * @author Administrator
 */
@Remote
public interface UserRemote {

    boolean authenticateUser(int userId, String url);

    UsersEB login(String username, String password) throws UserNotFoundException;

    boolean authenticateUser(UsersEB user, String url);

    int createUser(UsersEB user);

    int updateUser(UsersEB user);

    int deleteUser(UsersEB user);
    int deleteUser(Integer pk);

    Collection<UsersEB> getAllUsers();

    Collection<UserGroupsEB> getUserGroups();

    UserGroupsEB getUserGroup(int userGroupId);

    UsersEB findUser(String userName);
    
}
